# Maintainer: Hoang Nguyen <folliekazetani@protonmail.com>
pkgname=so
pkgver=0.4.10
pkgrel=0
pkgdesc="Terminal interface for Stackoverflow"
url="https://github.com/samtay/so"
arch="all"
license="MIT"
makedepends="cargo openssl-dev cargo-auditable"
source="$pkgname-$pkgver.tar.gz::https://github.com/samtay/so/archive/refs/tags/v$pkgver.tar.gz"

prepare() {
	default_prepare

	cargo fetch --target="$CTARGET" --locked
}

build() {
	cargo auditable build --frozen --release
}

check() {
	cargo test --frozen
}

package() {
	install -Dm755 target/release/so -t "$pkgdir"/usr/bin/
}

sha512sums="
c24c1540d432da3a2114a744c2919fcc138510b6fd77f3f709050b9abdc99216b4b27da93753d6bf3feb91b321d006778770d424df58678e4e44a87a4fe55135  so-0.4.10.tar.gz
"
